﻿using UnityEngine;
using UnityEditor;

namespace BehaviorSystem
{
    /// <summary>
    /// log节点
    /// </summary>
    public class LogNode : ActionNode
    {
        public string Format { get; set; }
        public LogNode(IBehaviorAgent agent, string format) : base(agent)
        {
            Format = format;
        }

        public override BTNodeState HandleAction()
        {
            Debug.Log(Format);
            CurState = BTNodeState.Success;
            return CurState;
        }

        public override void ResetNode()
        {
            CurState = BTNodeState.Running;
        }
    }
}